UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WzVcv0aHQfUvU2O1dVcvr7t3Jnb+Iu87xgpJUqkof6A='
WHERE
key_id = '428fd8cb9066d706de1bcadf5aaacda8915001678a36ce7e4414c4d27df33e69'
AND (
token = 'WzVcv0aHQfUvU2O1dVcvr7t3Jnb+Iu87xgpJUqkof6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)