UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LWpnD6aR6GXZob3sJQrqjixGYWvYf0IZJLKP9oDeLlg='
WHERE
key_id = '657adb55dda890a9d2e8c345bfa7bf00e2cba517f2dc66e32fbfa66d1cebc9e9'
AND (
token = 'LWpnD6aR6GXZob3sJQrqjixGYWvYf0IZJLKP9oDeLlg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)