UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YumCV3KXts1Wjg5OS173/17p6X0qKrLVN/UvzZ75nwU='
WHERE
key_id = '12d44581ad298a3b59ca5235088f4db63fd041d8917bba374be9f87265e83c15'
AND (
token = 'YumCV3KXts1Wjg5OS173/17p6X0qKrLVN/UvzZ75nwU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)