UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T/eINVJF1rLr41Y/yniQT5xdZcBzvi/L5HNaPtRbVeo='
WHERE
key_id = '8e13b2d867f7c5d3c8dc876b1963c2f6f60bd054e8ca2562850506c246859cf3'
AND (
token = 'T/eINVJF1rLr41Y/yniQT5xdZcBzvi/L5HNaPtRbVeo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)