UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/KG0356cw2kfY94FMS3WxVaAWZn1hUinA4VqH18/R5Y='
WHERE
key_id = 'aba2712e0f674038f9f4be8c4f51281e9df3f8cd2dc7b426608ad5a66552120c'
AND (
token = '/KG0356cw2kfY94FMS3WxVaAWZn1hUinA4VqH18/R5Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)