UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hydm6mZdpPyFFR6iN1lfUyh1r7FJpH5HHorn3Srr89Q='
WHERE
key_id = '3215fd274622c40dc3b908be4f6bb94b4bebf9cc5a1bf8d063b6729e9735c3e0'
AND (
token = 'hydm6mZdpPyFFR6iN1lfUyh1r7FJpH5HHorn3Srr89Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)