UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8mUK0H+9qDa3jii02E0SOLGZ2S4DLA9/E4Yjc3Fb2H0='
WHERE
key_id = '3f5ec98bf779715dd5157404dc2713d2bdf5d9c0e2db10d78045439ca2f7b1eb'
AND (
token = '8mUK0H+9qDa3jii02E0SOLGZ2S4DLA9/E4Yjc3Fb2H0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)