UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tU/1X1jfZrKEd3HccqfTyy9DxkgsUTxEtb3vWv8W2dE='
WHERE
key_id = '3c5e3321786f238c10acfc23757629ad05da834b6e28374d49de8061c3554600'
AND (
token = 'tU/1X1jfZrKEd3HccqfTyy9DxkgsUTxEtb3vWv8W2dE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)