UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZQeamYGoiWF9V9/LB1QcvH2e2lW0UUZi988ygkvYdDQ='
WHERE
key_id = '187ae5df7abfdfeca26380be7522dff9441c0f5f741f9a5ad2587dd99bf20e28'
AND (
token = 'ZQeamYGoiWF9V9/LB1QcvH2e2lW0UUZi988ygkvYdDQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)