UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1KGJdGUd8NgUak5Kok3qxk/o/aKbjJF6j/Xri5DiIYU='
WHERE
key_id = '1dc0746a3328cb4cde047c5a6fb5f3e875be66166b745eefeb571b63b9d3e93a'
AND (
token = '1KGJdGUd8NgUak5Kok3qxk/o/aKbjJF6j/Xri5DiIYU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)